using System;

namespace System.Web.Mvc
{
	public static partial class Holovacs
	{
		public static string Truncate (this string target, int characters)
		{
			if (!string.IsNullOrEmpty(target) && !string.IsNullOrWhiteSpace(target) && target.Length > characters) {
				return target.Substring(0, characters).Trim() + "...";
			}
			return target;
		}
	}
}

